package com.mj.haier.calc.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import javax.validation.constraints.*;

import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
import java.time.Instant;
import java.util.Objects;

/**
 * The AzFinSettleCars entity.
 * 安装单车辆结算单
 * @author ycm
 */
@ApiModel(description = "The AzFinSettleCars entity. 安装单车辆结算单 @author ycm")
@Entity
@Table(name = "az_fin_settle_cars")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Document(indexName = "azfinsettlecars")
public class AzFinSettleCars implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 结算批次号
     */
    @NotNull
    @ApiModelProperty(value = "结算批次号", required = true)
    @Column(name = "settle_batch_id", nullable = false, unique = true)
    private String settleBatchId;

    /**
     * 结算开始时间
     */
    @ApiModelProperty(value = "结算开始时间")
    @Column(name = "begin_date")
    private Instant beginDate;

    /**
     * 结算结束时间
     */
    @ApiModelProperty(value = "结算结束时间")
    @Column(name = "end_date")
    private Instant endDate;

    /**
     * 结算明细行数
     */
    @ApiModelProperty(value = "结算明细行数")
    @Column(name = "detail_count")
    private Integer detailCount;

    /**
     * 所属账期（结算年月）
     */
    @ApiModelProperty(value = "所属账期（结算年月）")
    @Column(name = "jhi_account")
    private String account;

    /**
     * 当期应结费用
     */
    @ApiModelProperty(value = "当期应结费用")
    @Column(name = "settle_amounts")
    private String settleAmounts;

    /**
     * 当期应结费用
     */
    @ApiModelProperty(value = "当期应结费用")
    @Column(name = "settle_encourage_amounts")
    private String settleEncourageAmounts;

    /**
     * 未结算负数金额
     */
    @ApiModelProperty(value = "未结算负数金额")
    @Column(name = "unsettle_negative_amounts")
    private String unsettleNegativeAmounts;

    /**
     * 实际应付
     */
    @ApiModelProperty(value = "实际应付")
    @Column(name = "actual_amounts")
    private String actualAmounts;

    /**
     * 网点ID
     */
    @ApiModelProperty(value = "网点ID")
    @Column(name = "cars_team_id")
    private String carsTeamId;

    /**
     * 网点名称
     */
    @ApiModelProperty(value = "网点名称")
    @Column(name = "cars_team_name")
    private String carsTeamName;

    /**
     * 网点V码
     */
    @ApiModelProperty(value = "网点V码")
    @Column(name = "cars_team_code")
    private String carsTeamCode;

    /**
     * 网点86码
     */
    @ApiModelProperty(value = "网点86码")
    @Column(name = "netpoints")
    private String netpoints;

    /**
     * 工贸编码
     */
    @ApiModelProperty(value = "工贸编码")
    @Column(name = "trade_code")
    private String tradeCode;

    /**
     * 车辆ID
     */
    @ApiModelProperty(value = "车辆ID")
    @Column(name = "cars_id")
    private String carsId;

    /**
     * 车辆牌号
     */
    @ApiModelProperty(value = "车辆牌号")
    @Column(name = "cars_number")
    private String carsNumber;

    /**
     * 司机手机号
     */
    @ApiModelProperty(value = "司机手机号")
    @Column(name = "driver_tel")
    private String driverTel;

    /**
     * 费用类型（结算单类型）名称, 车辆
     */
    @ApiModelProperty(value = "费用类型（结算单类型）名称, 车辆")
    @Column(name = "fee_type_name")
    private String feeTypeName;

    /**
     * 费用类型（结算单类型）名称 cars
     */
    @ApiModelProperty(value = "费用类型（结算单类型）名称 cars")
    @Column(name = "fee_type_code")
    private String feeTypeCode;

    /**
     * 项目来源编码
     */
    @ApiModelProperty(value = "项目来源编码")
    @Column(name = "source_name_code")
    private String sourceNameCode;

    /**
     * 项目来源名称
     */
    @ApiModelProperty(value = "项目来源名称")
    @Column(name = "source_name")
    private String sourceName;

    /**
     * 法人公司
     */
    @ApiModelProperty(value = "法人公司")
    @Column(name = "corporation")
    private String corporation;

    /**
     * 三级小微编码
     */
    @ApiModelProperty(value = "三级小微编码")
    @Column(name = "last_level")
    private String lastLevel;

    /**
     * 三级小微名称
     */
    @ApiModelProperty(value = "三级小微名称")
    @Column(name = "last_level_name")
    private String lastLevelName;

    /**
     * 快捷通转账结算状态
     */
    @ApiModelProperty(value = "快捷通转账结算状态")
    @Column(name = "settle_flag")
    private String settleFlag;

    /**
     * 快捷通转账时间
     */
    @ApiModelProperty(value = "快捷通转账时间")
    @Column(name = "pay_date")
    private Instant payDate;

    /**
     * 快捷通转账信息
     */
    @ApiModelProperty(value = "快捷通转账信息")
    @Column(name = "pay_remark")
    private String payRemark;

    /**
     * 快捷通转账外围唯一性主键
     */
    @ApiModelProperty(value = "快捷通转账外围唯一性主键")
    @Column(name = "outer_trade_no")
    private String outerTradeNo;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Column(name = "remark")
    private String remark;

    @Column(name = "gmt_modified")
    private Instant gmtModified;

    @Column(name = "modified_user")
    private String modifiedUser;

    @Column(name = "gmt_create")
    private Instant gmtCreate;

    @Column(name = "create_user")
    private String createUser;

    /**
     * 备用字段 add1
     */
    @ApiModelProperty(value = "备用字段 add1")
    @Column(name = "add_1")
    private String add1;

    /**
     * 备用字段 add2
     */
    @ApiModelProperty(value = "备用字段 add2")
    @Column(name = "add_2")
    private String add2;

    /**
     * 备用字段 add3
     */
    @ApiModelProperty(value = "备用字段 add3")
    @Column(name = "add_3")
    private String add3;

    /**
     * 备用字段 add4
     */
    @ApiModelProperty(value = "备用字段 add4")
    @Column(name = "add_4")
    private String add4;

    /**
     * 备用字段 add5
     */
    @ApiModelProperty(value = "备用字段 add5")
    @Column(name = "add_5")
    private String add5;

    public AzFinSettleCars(){}

    public AzFinSettleCars(Long id, String settleBatchId, String settleAmounts, String settleEncourageAmounts, String unsettleNegativeAmounts, 
        String actualAmounts, String carsId, String sourceNameCode){
            this.id = id;
            this.settleBatchId = settleBatchId;
            this.settleAmounts = settleAmounts;
            this.settleEncourageAmounts = settleEncourageAmounts;
            this.unsettleNegativeAmounts = unsettleNegativeAmounts;
            this.actualAmounts = actualAmounts;
            this.carsId = carsId;
            this.sourceNameCode = sourceNameCode;
    }

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSettleBatchId() {
        return settleBatchId;
    }

    public AzFinSettleCars settleBatchId(String settleBatchId) {
        this.settleBatchId = settleBatchId;
        return this;
    }

    public void setSettleBatchId(String settleBatchId) {
        this.settleBatchId = settleBatchId;
    }

    public Instant getBeginDate() {
        return beginDate;
    }

    public AzFinSettleCars beginDate(Instant beginDate) {
        this.beginDate = beginDate;
        return this;
    }

    public void setBeginDate(Instant beginDate) {
        this.beginDate = beginDate;
    }

    public Instant getEndDate() {
        return endDate;
    }

    public AzFinSettleCars endDate(Instant endDate) {
        this.endDate = endDate;
        return this;
    }

    public void setEndDate(Instant endDate) {
        this.endDate = endDate;
    }

    public Integer getDetailCount() {
        return detailCount;
    }

    public AzFinSettleCars detailCount(Integer detailCount) {
        this.detailCount = detailCount;
        return this;
    }

    public void setDetailCount(Integer detailCount) {
        this.detailCount = detailCount;
    }

    public String getAccount() {
        return account;
    }

    public AzFinSettleCars account(String account) {
        this.account = account;
        return this;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getSettleAmounts() {
        return settleAmounts;
    }

    public AzFinSettleCars settleAmounts(String settleAmounts) {
        this.settleAmounts = settleAmounts;
        return this;
    }

    public void setSettleAmounts(String settleAmounts) {
        this.settleAmounts = settleAmounts;
    }

    public String getSettleEncourageAmounts() {
        return settleEncourageAmounts;
    }

    public AzFinSettleCars settleEncourageAmounts(String settleEncourageAmounts) {
        this.settleEncourageAmounts = settleEncourageAmounts;
        return this;
    }

    public void setSettleEncourageAmounts(String settleEncourageAmounts) {
        this.settleEncourageAmounts = settleEncourageAmounts;
    }

    public String getUnsettleNegativeAmounts() {
        return unsettleNegativeAmounts;
    }

    public AzFinSettleCars unsettleNegativeAmounts(String unsettleNegativeAmounts) {
        this.unsettleNegativeAmounts = unsettleNegativeAmounts;
        return this;
    }

    public void setUnsettleNegativeAmounts(String unsettleNegativeAmounts) {
        this.unsettleNegativeAmounts = unsettleNegativeAmounts;
    }

    public String getActualAmounts() {
        return actualAmounts;
    }

    public AzFinSettleCars actualAmounts(String actualAmounts) {
        this.actualAmounts = actualAmounts;
        return this;
    }

    public void setActualAmounts(String actualAmounts) {
        this.actualAmounts = actualAmounts;
    }

    public String getCarsTeamId() {
        return carsTeamId;
    }

    public AzFinSettleCars carsTeamId(String carsTeamId) {
        this.carsTeamId = carsTeamId;
        return this;
    }

    public void setCarsTeamId(String carsTeamId) {
        this.carsTeamId = carsTeamId;
    }

    public String getCarsTeamName() {
        return carsTeamName;
    }

    public AzFinSettleCars carsTeamName(String carsTeamName) {
        this.carsTeamName = carsTeamName;
        return this;
    }

    public void setCarsTeamName(String carsTeamName) {
        this.carsTeamName = carsTeamName;
    }

    public String getCarsTeamCode() {
        return carsTeamCode;
    }

    public AzFinSettleCars carsTeamCode(String carsTeamCode) {
        this.carsTeamCode = carsTeamCode;
        return this;
    }

    public void setCarsTeamCode(String carsTeamCode) {
        this.carsTeamCode = carsTeamCode;
    }

    public String getNetpoints() {
        return netpoints;
    }

    public AzFinSettleCars netpoints(String netpoints) {
        this.netpoints = netpoints;
        return this;
    }

    public void setNetpoints(String netpoints) {
        this.netpoints = netpoints;
    }

    public String getTradeCode() {
        return tradeCode;
    }

    public AzFinSettleCars tradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
        return this;
    }

    public void setTradeCode(String tradeCode) {
        this.tradeCode = tradeCode;
    }

    public String getCarsId() {
        return carsId;
    }

    public AzFinSettleCars carsId(String carsId) {
        this.carsId = carsId;
        return this;
    }

    public void setCarsId(String carsId) {
        this.carsId = carsId;
    }

    public String getCarsNumber() {
        return carsNumber;
    }

    public AzFinSettleCars carsNumber(String carsNumber) {
        this.carsNumber = carsNumber;
        return this;
    }

    public void setCarsNumber(String carsNumber) {
        this.carsNumber = carsNumber;
    }

    public String getDriverTel() {
        return driverTel;
    }

    public AzFinSettleCars driverTel(String driverTel) {
        this.driverTel = driverTel;
        return this;
    }

    public void setDriverTel(String driverTel) {
        this.driverTel = driverTel;
    }

    public String getFeeTypeName() {
        return feeTypeName;
    }

    public AzFinSettleCars feeTypeName(String feeTypeName) {
        this.feeTypeName = feeTypeName;
        return this;
    }

    public void setFeeTypeName(String feeTypeName) {
        this.feeTypeName = feeTypeName;
    }

    public String getFeeTypeCode() {
        return feeTypeCode;
    }

    public AzFinSettleCars feeTypeCode(String feeTypeCode) {
        this.feeTypeCode = feeTypeCode;
        return this;
    }

    public void setFeeTypeCode(String feeTypeCode) {
        this.feeTypeCode = feeTypeCode;
    }

    public String getSourceNameCode() {
        return sourceNameCode;
    }

    public AzFinSettleCars sourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
        return this;
    }

    public void setSourceNameCode(String sourceNameCode) {
        this.sourceNameCode = sourceNameCode;
    }

    public String getSourceName() {
        return sourceName;
    }

    public AzFinSettleCars sourceName(String sourceName) {
        this.sourceName = sourceName;
        return this;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getCorporation() {
        return corporation;
    }

    public AzFinSettleCars corporation(String corporation) {
        this.corporation = corporation;
        return this;
    }

    public void setCorporation(String corporation) {
        this.corporation = corporation;
    }

    public String getLastLevel() {
        return lastLevel;
    }

    public AzFinSettleCars lastLevel(String lastLevel) {
        this.lastLevel = lastLevel;
        return this;
    }

    public void setLastLevel(String lastLevel) {
        this.lastLevel = lastLevel;
    }

    public String getLastLevelName() {
        return lastLevelName;
    }

    public AzFinSettleCars lastLevelName(String lastLevelName) {
        this.lastLevelName = lastLevelName;
        return this;
    }

    public void setLastLevelName(String lastLevelName) {
        this.lastLevelName = lastLevelName;
    }

    public String getSettleFlag() {
        return settleFlag;
    }

    public AzFinSettleCars settleFlag(String settleFlag) {
        this.settleFlag = settleFlag;
        return this;
    }

    public void setSettleFlag(String settleFlag) {
        this.settleFlag = settleFlag;
    }

    public Instant getPayDate() {
        return payDate;
    }

    public AzFinSettleCars payDate(Instant payDate) {
        this.payDate = payDate;
        return this;
    }

    public void setPayDate(Instant payDate) {
        this.payDate = payDate;
    }

    public String getPayRemark() {
        return payRemark;
    }

    public AzFinSettleCars payRemark(String payRemark) {
        this.payRemark = payRemark;
        return this;
    }

    public void setPayRemark(String payRemark) {
        this.payRemark = payRemark;
    }

    public String getOuterTradeNo() {
        return outerTradeNo;
    }

    public AzFinSettleCars outerTradeNo(String outerTradeNo) {
        this.outerTradeNo = outerTradeNo;
        return this;
    }

    public void setOuterTradeNo(String outerTradeNo) {
        this.outerTradeNo = outerTradeNo;
    }

    public String getRemark() {
        return remark;
    }

    public AzFinSettleCars remark(String remark) {
        this.remark = remark;
        return this;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Instant getGmtModified() {
        return gmtModified;
    }

    public AzFinSettleCars gmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
        return this;
    }

    public void setGmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
    }

    public String getModifiedUser() {
        return modifiedUser;
    }

    public AzFinSettleCars modifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
        return this;
    }

    public void setModifiedUser(String modifiedUser) {
        this.modifiedUser = modifiedUser;
    }

    public Instant getGmtCreate() {
        return gmtCreate;
    }

    public AzFinSettleCars gmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
        return this;
    }

    public void setGmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getCreateUser() {
        return createUser;
    }

    public AzFinSettleCars createUser(String createUser) {
        this.createUser = createUser;
        return this;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public String getAdd1() {
        return add1;
    }

    public AzFinSettleCars add1(String add1) {
        this.add1 = add1;
        return this;
    }

    public void setAdd1(String add1) {
        this.add1 = add1;
    }

    public String getAdd2() {
        return add2;
    }

    public AzFinSettleCars add2(String add2) {
        this.add2 = add2;
        return this;
    }

    public void setAdd2(String add2) {
        this.add2 = add2;
    }

    public String getAdd3() {
        return add3;
    }

    public AzFinSettleCars add3(String add3) {
        this.add3 = add3;
        return this;
    }

    public void setAdd3(String add3) {
        this.add3 = add3;
    }

    public String getAdd4() {
        return add4;
    }

    public AzFinSettleCars add4(String add4) {
        this.add4 = add4;
        return this;
    }

    public void setAdd4(String add4) {
        this.add4 = add4;
    }

    public String getAdd5() {
        return add5;
    }

    public AzFinSettleCars add5(String add5) {
        this.add5 = add5;
        return this;
    }

    public void setAdd5(String add5) {
        this.add5 = add5;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        AzFinSettleCars azFinSettleCars = (AzFinSettleCars) o;
        if (azFinSettleCars.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), azFinSettleCars.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "AzFinSettleCars{" +
            "id=" + getId() +
            ", settleBatchId='" + getSettleBatchId() + "'" +
            ", beginDate='" + getBeginDate() + "'" +
            ", endDate='" + getEndDate() + "'" +
            ", detailCount=" + getDetailCount() +
            ", account='" + getAccount() + "'" +
            ", settleAmounts='" + getSettleAmounts() + "'" +
            ", settleEncourageAmounts='" + getSettleEncourageAmounts() + "'" +
            ", unsettleNegativeAmounts='" + getUnsettleNegativeAmounts() + "'" +
            ", actualAmounts='" + getActualAmounts() + "'" +
            ", carsTeamId='" + getCarsTeamId() + "'" +
            ", carsTeamName='" + getCarsTeamName() + "'" +
            ", carsTeamCode='" + getCarsTeamCode() + "'" +
            ", netpoints='" + getNetpoints() + "'" +
            ", tradeCode='" + getTradeCode() + "'" +
            ", carsId='" + getCarsId() + "'" +
            ", carsNumber='" + getCarsNumber() + "'" +
            ", driverTel='" + getDriverTel() + "'" +
            ", feeTypeName='" + getFeeTypeName() + "'" +
            ", feeTypeCode='" + getFeeTypeCode() + "'" +
            ", sourceNameCode='" + getSourceNameCode() + "'" +
            ", sourceName='" + getSourceName() + "'" +
            ", corporation='" + getCorporation() + "'" +
            ", lastLevel='" + getLastLevel() + "'" +
            ", lastLevelName='" + getLastLevelName() + "'" +
            ", settleFlag='" + getSettleFlag() + "'" +
            ", payDate='" + getPayDate() + "'" +
            ", payRemark='" + getPayRemark() + "'" +
            ", outerTradeNo='" + getOuterTradeNo() + "'" +
            ", remark='" + getRemark() + "'" +
            ", gmtModified='" + getGmtModified() + "'" +
            ", modifiedUser='" + getModifiedUser() + "'" +
            ", gmtCreate='" + getGmtCreate() + "'" +
            ", createUser='" + getCreateUser() + "'" +
            ", add1='" + getAdd1() + "'" +
            ", add2='" + getAdd2() + "'" +
            ", add3='" + getAdd3() + "'" +
            ", add4='" + getAdd4() + "'" +
            ", add5='" + getAdd5() + "'" +
            "}";
    }
}
